local skel = fk.CreateSkill {
  name = "#drugs_trigger",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["@drugsInflicted"] = "散:受伤+",
  ["#drugs_trigger"] = "散",
}

skel:addEffect(fk.DamageInflicted, {
  mute = true,
  priority = 0.01,
  can_trigger = function(self, event, target, player, data)
    if target == player then
      return player:getMark("@drugsInflicted") > 0
    end
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local n = player:getMark("@drugsInflicted")
    room:setPlayerMark(player, "@drugsInflicted", 0)
    data:changeDamage(n)
  end,
})

skel:addEffect("targetmod", {
  residue_func = function(self, player, skill, scope)
    if skill then
      if skill.trueName == "slash_skill" or skill.trueName == "analeptic_skill" then
        return player:getMark("drugs_buff-phase")
      end
    end
  end,
})

return skel
